package cn.mesmile.design.factory.simple;

import java.util.Objects;

/**
 * @author zb
 * @date 2021/11/19 16:44
 * @Description
 */
public class SimpleFactoryPay {

    public static Pay createPay(String payType){
        if (Objects.equals("alipay", payType)){
            return new AliPay();
        } else if (Objects.equals("wechat", payType)){
            return new WechatPay();
        }
        return null;
    }

}
